package tool;

public class free_calculate {

    //根据通话时长，计算话
    private double  cost;
    //返回话费
    public double calculate(int totalminiute){
        if(totalminiute <= 20)
            cost = 0.05 * totalminiute;
        else
            cost = 1 + (totalminiute-20)*0.1;
        double  cost_free=cost;
        return cost_free;

    }
}
